package com.example.ecommercemanagesystem.util;


import com.example.ecommercemanagesystem.filter.LoginFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class LoginFilterConfig {
    @Bean
    public FilterRegistrationBean myfilterRegistrationBean() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new LoginFilter());
        filterRegistrationBean.addUrlPatterns("/addgoods");
        filterRegistrationBean.addUrlPatterns("/goodslist");
        filterRegistrationBean.addUrlPatterns("/index");
        filterRegistrationBean.addUrlPatterns("/editgoods");
        return filterRegistrationBean;
    }


}
